<?php
/* @var $this TutorialsController */
/* @var $model Tutorials */

$this->breadcrumbs=array(
	'Tutorials'=>array('index'),
	$model->title,
);
?>

<h1><?php echo $model->title; ?></h1>
<?php echo "Type: ".$model1->type_name . "<br/>"; ?>
<?php if($model->tutorial_type_id == 1): ?>
<?php foreach($model2 as $m_s): ?>
<?php echo "Download " . CHtml::link($model->title, Files::model()->findByPk($m_s->file_id)->location). "<br/>"; ?>
<?php endforeach; ?>
<?php endif; ?>
<?php if($model->tutorial_type_id == 2): ?>
<?php echo Files::model()->findByPk($model4->file_id)->location; ?>
<?php endif; ?>
<br/>
<hr/>
<?php if(!Yii::app()->user->isGuest): ?>
<?php $this->renderPartial('/forum/_form', array('model'=>$model, 'model5'=>$model5, 'model6'=>$model6, 'model7'=>$model7, 'model8'=>$model8, 'question'=>$question)); ?>
<?php endif; ?>
<hr/>
<?php
	//$this->beginWidget('zii.widgets.CPortlet', array('title'=>'FAQ',));
	if(!Yii::app()->user->isGuest){
	$this->widget('QuestionAnswerWidget', array('tutorial_id'=>$model->id, 'answers'=>$answers));
	}
	//$this->endWidget();
 ?>